class ActivitiesListVo {
  List<ActivitiesItem>? data;

  ActivitiesListVo({this.data});

  ActivitiesListVo.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      data = [];
      json['data'].forEach((v) {
        data!.add(new ActivitiesItem.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class ActivitiesItem {
  String? title;
  int? type;
  int? id;
  String? image;
  List<ProductsItem>? products;

  ActivitiesItem({this.title, this.type, this.id, this.image, this.products});

  ActivitiesItem.fromJson(Map<String, dynamic> json) {
    title = json['title'];
    type = json['type'];
    id = json['id'];
    image = json['image'];
    if (json['products'] != null) {
      products = [];
      json['products'].forEach((v) {
        products!.add(new ProductsItem.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this.title;
    data['type'] = this.type;
    data['id'] = this.id;
    data['image'] = this.image;
    if (this.products != null) {
      data['products'] = this.products!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class ProductsItem {
  int? id;
  String? productSn;
  int? categoryId;
  String? thumbnail;
  String? title;
  String? marketPrice;
  String? price;

  ProductsItem(
      {this.id,
      this.productSn,
      this.categoryId,
      this.thumbnail,
      this.title,
      this.marketPrice,
      this.price});

  ProductsItem.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    productSn = json['product_sn'];
    categoryId = json['category_id'];
    thumbnail = json['thumbnail'];
    title = json['title'];
    marketPrice = json['market_price'];
    price = json['price'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['product_sn'] = this.productSn;
    data['category_id'] = this.categoryId;
    data['thumbnail'] = this.thumbnail;
    data['title'] = this.title;
    data['market_price'] = this.marketPrice;
    data['price'] = this.price;
    return data;
  }
}
